# Run ElasticSearch as this user ID and group ID
#ES_USER=elasticsearch
{% if elasticsearch_user is defined %}
ES_USER={{ elasticsearch_user }}
{% endif %}
#ES_GROUP=elasticsearch
{% if elasticsearch_group is defined %}
ES_GROUP={{ elasticsearch_group }}
{% endif %}

# Heap Size (defaults to 256m min, 1g max)
#ES_HEAP_SIZE=2g
{% if elasticsearch_heap_size is defined %}
ES_HEAP_SIZE={{ elasticsearch_heap_size }}
{% endif %}

# Heap new generation
#ES_HEAP_NEWSIZE=

# max direct memory
#ES_DIRECT_SIZE=

# Maximum number of open files, defaults to 65535.
#MAX_OPEN_FILES=65535
{% if elasticsearch_max_open_files is defined %}
MAX_OPEN_FILES={{ elasticsearch_max_open_files }}
{% endif %}

# Maximum locked memory size. Set to "unlimited" if you use the
# bootstrap.mlockall option in elasticsearch.yml. You must also set
# ES_HEAP_SIZE.
#MAX_LOCKED_MEMORY=unlimited
{% if elasticsearch_max_locked_memory is defined %}
MAX_LOCKED_MEMORY={{ elasticsearch_max_locked_memory }}
{% endif %}

# ElasticSearch log directory
#LOG_DIR=/var/log/elasticsearch

# ElasticSearch data directory
#DATA_DIR=/var/lib/elasticsearch

# ElasticSearch work directory
#WORK_DIR=/tmp/elasticsearch

# ElasticSearch configuration directory
#CONF_DIR=/etc/elasticsearch

# ElasticSearch configuration file (elasticsearch.yml)
#CONF_FILE=/etc/elasticsearch/elasticsearch.yml

# Additional Java OPTS
{% if elasticsearch_java_opts is defined %}
ES_JAVA_OPTS="{{ elasticsearch_java_opts }}"
{% else %}
#ES_JAVA_OPTS=
{% endif %}

# Environment Vars
{% if elasticsearch_env_use_gc_logging is defined %}
export ES_USE_GC_LOGGING=true
{% endif %}

